﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.DependencyInjection;
#if DOT_NET
using Microsoft.VisualStudio.TestTools.UnitTesting;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#endif
using StyleMVVM.UnitTests.TestClasses.SimpleObjects;

namespace StyleMVVM.UnitTests.DependencyInjection
{
	[TestClass]
	public class ImportConstructorTests : BaseTestClass
	{
		[TestMethod]
		public void NoParameterImport()
		{
			ImportConstructorNoParam importConstructorObject =
				bootstrapper.Container.Locate(
					typeof(ImportConstructorNoParam).Name) as ImportConstructorNoParam;

			Assert.IsNotNull(importConstructorObject);
		}

		[TestMethod]
		public void OneParameterImport()
		{
			ImportConstructorOneParam importConstructorObject =
				bootstrapper.Container.Locate(typeof(ImportConstructorOneParam).Name) as ImportConstructorOneParam;

			Assert.IsNotNull(importConstructorObject);
			Assert.IsNotNull(importConstructorObject.Export);
		}

		[TestMethod]
		public void MultipleParameterImport()
		{
			ImportConstructorMultipleParam importConstructorObject =
				bootstrapper.Container.Locate(typeof(ImportConstructorMultipleParam).Name) as ImportConstructorMultipleParam;

			Assert.IsNotNull(importConstructorObject);
			Assert.IsNotNull(importConstructorObject.SimpleExport);
			Assert.IsNotNull(importConstructorObject.TestInterface);
			Assert.IsNotNull(importConstructorObject.GenericTestInterface);
		}
	}
}